// 修复大量文件提交导致超出命令行长度限制的问题
module.exports = {
  "*.{js,jsx,vue,ts,tsx}": filenames => {
    const args = filenames.join(" ");
    if (args.length > 8000) {
      return ["vue-cli-service lint", "git add ."];
    } else {
      return [`vue-cli-service lint ${args}`, `git add ${args}`];
    }
  }
};
